/*
 * @Author: 关棺 9382059+close-the-coffin@user.noreply.gitee.com
 * @Date: 2024-06-08 13:16:55
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-07-20 10:23:12
 * @FilePath: \supervision-ui\src\api\system\Approval.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/* 基础设置-审批流程 */
import request from "@/utils/request";

// 新增
export const approvalClassifySaveOrModifyClassify = (params) => {
  return request({
    url: `/approval/approval/approvalClassify/saveOrModifyClassify`,
    method: "post",
    data: params,
  });
};
// list
export const approvalClassifyList = (params) => {
  return request({
    url: `/approval/approval/approvalClassify/list`,
    method: "post",
    params,
  });
};
// info
export const approvalClassifyInfo = (params) => {
  return request({
    url: `/approval/approval/approvalClassify/info`,
    method: "post",
    params,
  });
};
//list1
export const approvalFromQueryApprovalByLaunch = (data) => {
  return request({
    url: `/approval/approval/approvalFrom/queryApprovalByLaunch`,
    method: "post",
    data,
  });
};

//list2
export const approvalFromQueryApprovalBy = (data) => {
  return request({
    url: `/approval/approval/approvalFrom/queryApprovalBy`,
    method: "post",
    data,
  });
};

// 发起审批
export const approvalFromInitiateApproval = (params) => {
  return request({
    url: `/approval/approval/approvalFrom/initiateApproval`,
    method: "post",
    data: params,
  });
};

//新增 - 审批表单
export const approvalFromAddFrom = (params) => {
  return request({
    url: `/approval/approval/approvalFrom/addFrom`,
    method: "post",
    data: params,
  });
};
//修改- 审批表单
export const approvalFromUpdateApproval = (params) => {
  return request({
    url: `/approval/approval/approvalFrom/updateApproval`,
    method: "post",
    data: params,
  });
};
// 删除 审批单  - 审批
export const approvalFromDeleteApproval = (params) => {
  return request({
    url: `/approval/approval/approvalFrom/deleteApproval`,
    method: "post",
    data: params,
  });
};
// 获取审批表单详情信息 由我
export const approvalFromQueryFromById = (params) => {
  return request({
    url: `/approval/approval/approvalFrom/queryFromById`,
    method: "get",
    params,
  });
};
// 获取审批表单详情信息 待我
export const approvalFromQuerySubmitById = (params) => {
  return request({
    url: `/approval/approval/approvalFrom/querySubmitById`,
    method: "get",
    params,
  });
};
// 由我审核审批
export const approvalFromQueryByRecords = (params) => {
  return request({
    url: `/approval/approval/approvalFrom/queryByRecords`,
    method: "get",
    params,
  });
};
// 待我审核审批
export const approvalFromApproval = (data) => {
  return request({
    url: `/approval/approval/approvalFrom/approval`,
    method: "post",
    data,
  });
};
// 租赁list
export const approvalFromLeaseList = (params) => {
  return request({
    url: `/approval/approval/approvalFrom/leaseList`,
    method: "post",
    params,
  });
};
